Test improvements: RF and gradient waveform accuracy#764
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #764 +/- ##
==========================================
- Coverage 89.62% 88.55% -1.08%
==========================================
Files 76 76
Lines 5397 5389 -8
==========================================
- Hits 4837 4772 -65
- Misses 560 617 +57
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
fa7dd0c to
3fa5a43
Compare
3fa5a43 to
295d3a2
Compare
cncastillo
commented
May 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
#380 asks for simulation coverage across the RF and gradient waveform constructors. The missing coverage is not just constructor coverage: the same physical waveform should simulate to the same signal across block, uniformly sampled, and time-shaped event definitions.
Solution
Adds a KomaMRICore accuracy test for the 3 x 3 RF/Grad waveform grid. Each case builds the same RF pulse and readout gradient with
@addblock, samples ADC during the gradient block, and compares the signal against an OrdinaryDiffEqTsit5 Bloch reference.The DiffEq reference path is shared through
diffeq_signal, which also replaces duplicated reference code in the RF accuracy and motion tests.Tests
TEST_GROUP=motion julia --project=KomaMRICore -e 'import Pkg; Pkg.test()'julia --project=KomaMRICore -e 'import Pkg; Pkg.test()'Development
Closes #380